package org.x.casemodule.enums;

public enum EventType {
    //'COURT','CONSULT','MEETING','TRAINING','OTHER'
    COURT("0", "法院"),
    CONSULT("1", "咨询"),
    MEETING("2", "会议"),
    TRAINING("3", "培训"),
    OTHER("4", "其他");
    private String code;
    private String name;
    EventType(String code, String name) {
        this.code = code;
        this.name = name;



    }



    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }




    public static EventType getByCode(String code) {
        for (EventType type : EventType.values()) {
            if (type.code.equals(code)) {
                return type;
            }
        }
        return null;
    }


    public static EventType getByName(String name) {
        for (EventType type : EventType.values()) {
            if (type.name.equals(name)) {
                return type;
            }
        }
        return null;
    }







}
